package com.smile.frame.seckill.core.queqe;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author LGC
 * @date 2025/1/16
 */
@Data
@Valid
@Schema(description = "交易秒杀订单创建请求")
public class TradeSecKillOrderCreateReq {
    @Schema(description = "用户id")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "秒杀活动id")
    @NotNull(message = "秒杀活动id不能为空")
    private Long activityId;

    @Schema(description = "skuid")
    @NotNull(message = "skuid不能为空")
    private Long skuId;

    @Schema(description = "购买数量", example = "1")
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量最小值为 {value}")
    private Integer count;
}
